package com.google.jstestdriver.maven;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;

public class ProcessFactory {
    public static Process create(String[] processArgs)
            throws IOException {
        return create(Arrays.asList(processArgs));
    }

    public static Process create(List<String> processArgs) throws IOException {
        ProcessBuilder pb = new ProcessBuilder(processArgs);
        pb.redirectErrorStream(true);
        return pb.start();
    }
}
